clear;
raw=load('A600IntensityRaw.txt');
energy=load('A600energy.txt');
momentum=load('A600momentum.txt');


for i=1:length(momentum)
    if momentum(i)>-0.788
        i1=i;
        break;
    end
end

for i=1:length(momentum)
    if momentum(i)>0.788
        i2=i;
        break;
    end
end

rawsub=raw;


for i=i1:i2
    bk=(raw(i1,:)+raw(i2,:))/2;
    rawsub(i,:)=raw(i,:)-bk*0.5;
end

rawsub=(abs(rawsub)/2).^1.4;
figure('position',[100,100,800,800]);
pcolor(momentum,energy,rawsub');box on; shading interp;
xlim([-0.788,0.788]);
ylim([-1.5,0.2]);
load('MyColormaps_Terrain','mycmap');
mycmap1=mycmap(1:350,:);
colormap(mycmap1);
caxis([0,0.45]);
set(gca,'PlotBoxAspectRatio',[1 1 2]); set(gca,'LineWidth',1);
colorbar
% saveas(gcf,'A600sub.png');


